//
//  BECGContextExtension.swift
//  BasicExtensions
//
//  Created by Fanxx on 2018/3/23.
//  Copyright © 2018年 fanxx. All rights reserved.
//

import Foundation

extension CGContext {
    public func addRoundRect(in rect: CGRect, radius: CGFloat, corners: UIRectCorner = .allCorners) {
        UIBezierPath.init(roundedRect: rect, byRoundingCorners: corners, cornerRadii: .init(radius, 0)).close()
    }
}
